home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2003 November / PCWK1103B.iso / DesignCAD 3D Max PLUS trial 30 / DATA1.CAB / Example_Files / Sample_Macros / XYZ Point Getter.d3m < prev   
Encoding:
Text File  |  2003-09-29  |  1.1 KB  |  31 lines

  1. input "What do you want to call the output file?" o$ 'gets destination
  2. open "o", 1, o$                    'opens output drive
  3. input "Find x, y, and z of only selected entities?" t$ 'gets if user wants only entities 
  4.                             'if selected
  5. r$=LEFT$(t$, 1)                    'Just gets the y or n of yes or no
  6. count = sys(9)                    'gets number of entities
  7. For i = 1 To count                'gets each entity one at a time
  8. entity (i)                    'initialize entity
  9. s=sys(96)                    'checks if selected
  10. if r$ = "y" then r$ = "Y"        ' initializes capitialization so
  11. if r$ ="n" then r$ = "N"        'user doesnt have to
  12. if r$ = "Y" then                'if only selected entities
  13. if s=1 then                    'only those selected
  14. print #1," "                    'puts a space between entities
  15.                           ' get all points into jx, jy, jz
  16.      for j = 1 to sys(1)        'and prints them out
  17.       pointval jx jy jz j
  18. print #1, jx,jy,jz
  19.   next j
  20. endif                        'ends selected if
  21. endif                        'ends yes if
  22. if r$ = "N" then            'if all entities wanted
  23. print #1," "                'blank line
  24.                 ' get all points into jx, jy, jz
  25.      for j = 1 to sys(1)    'and prints them out
  26.       pointval jx jy jz j
  27. print #1, jx,jy,jz
  28.   next j
  29. endif                    'ends no if
  30. next i                    'loops till all entities done
  31.